package com.cpf.view;

import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author cpf email: cpfprogrammer@163.com
 * @date 2022/6/1 下午2:58
 */
public class ModelRequest {
    @JsonProperty("Name")
    private String name;

    public ModelRequest name(String name){
        this.name = name;
        return this;
    }

    public ModelRequest() {
    }

    public ModelRequest(String name) {
        this.name = name;
    }

    public @NotNull @Size(min = 1) String getName(){
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ModelRequest build(){
        return new ModelRequest(this.name);
    }
}
